<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Connection
 *
 * @author Administrator
 */
class Connection {
    //put your code here

    private $connection;// = mysql_connect('localhost', 'myuser', '123456') ;

    public function   __construct() {
        $this->connection = null;
    }
    public function open()
    {
       $this->connection = mysql_connect("localhost", "root", "");
       if( !$this->connection)
               die("Not connected: ". mysql_error ());
       mysql_select_db("toihoctienganh", $this->connection)
               or die("Could not select DB" . mysql_error());
       return $this->connection;
    }
}
?>
